We will start with the initial derivative based edge finding solution for cameraman, using $dx = [[1, -1], [0,0]], dy=[[1, 0], [-1,0]]$
We can extract the edges after thresholding out some of the noise.
Now we will blur the image and see how our previous process compares.
With the blurred image, our regular dx/dy convolutions highlight the edges with almost all of the noise removed, resulting in more defined shapes.
We can also do this via taking the derivatives of the Gaussian and applying those, to get the same result. Let's first see the derivates of the Gaussian.
Now applying them to the image individually.
Now applying them together finally we see the edges.
The two results are the same.
We will start by analyzing the sample image
To understand how this should be done, lets first take a look at the individual derivatives and the gradient angles of the original image. We can calculate the gradient angles as simply the arctan(dx, dy).
The gradient angles are too noisy to meaningfully understand, so let's try filtering by a threshold on the magnitude of the angles, which conceptually tells us the strength of that angle as a signal to filter on. We can calculate the magnitudes as a function $\sqrt{dx^{2}+{dy}^2}$
Now we can look at the filtered angles.
As requested, we now compute the histrogram of the original image's gradient angles
Now let's try to understand what the verticle and horizontal lines look like in this image
Now lets define the number of edges to be the count of these values taken as a ratio between the count of the total number of total edges
We can now find the best angle by iterating over a large range of angles and picking the one with the greatest proporation of straight edges
We find the best angle is -3, so we can now show what that is supposed to be.
As well as the histogram for this
Now to do this on 3 other images:
This last one is clearly a failure since the actual tower is tilted. Interesting, we can see that the tower is tilted by about 7 degrees.
Original Taj Photo
Sharpened Taj Photo
Sharpening Obama
Original Random photo
Blurred Random photo
Resharpened Random photo
The resharpened image is quite a bit closer to the original, but not quite there. You can see the eyes in more detail, but much was lost in the skin.
Now we're testing hybrid images, first with the sample images.
Next up, my friends Cam and Sara
I would consider this a failure, since you can't really tell the two apart at any distance, and the teeth as a feature just make the image hard to visually process.
Next is Obama
This one is my favorite, so I'll break down the fourier analysis for this.
Original Fourier Transform Magnitudes:
Lowpass FT Mag:
Highpass FT Mag:
This Fourier graph is a little weird, considering we should see a hole where the low frequencies are... That being said we can look at the actual highpass-filtred image and see that it is functioning correctly so not sure what's going on here.
Starting with the lincoln image
Trying it out on the Obama image
First we test out the oraple:
And now, we'll see two faces from the recent news in a new light...
This one was my favorite
And now for a cute image